package com.yixing.tech.wms.service;

import com.yixing.tech.common.base.BusinessException;
import com.yixing.tech.wms.stock.out.callback.error.TaskErrorCallbackVO;
import com.yixing.tech.common.entity.WCSTaskCallbackVO;

/**
 * @author yixing tech
 * @since 1.0.0
 */
public interface InitService {

    boolean initIn(String workCode) throws BusinessException;

    void handleCallback(String taskCode, String method, String locCode, String podCode);

    default void handleCallback(WCSTaskCallbackVO callbackVO) {
        handleCallback(callbackVO.getTaskCode(), callbackVO.getMethod(), callbackVO.getCurrentPositionCode(), callbackVO.getPodCode());
    }

    Object handleErrorCallback(TaskErrorCallbackVO errorCallbackVO) throws BusinessException;

}
